package com.utils;/**
 * @AUTHOR: 我是章璐锋憨憨
 * @Data:
 * @Version:
 */

/**
 * @outhor RD
 * 2021/12/20
 */
public class Result {
    private Boolean success;
    private String msg;
    private Object data;

    private Result(){
        success = true;
    }

    private Result(Boolean success){
        this.success = success;
    }

    private Result(Object data){
        this.data = data;
    }

    public static Result me(Boolean success){
        return new Result(success);
    }

    public static Result me(Object data){
        return new Result(data);
    }

    public Result setData(Object data){
        this.data = data;
        return this;
    }

    public Result setSuccess(Boolean success){
        this.success = success;
        return this;
    }

    public Result setMsg(String msg){
        this.msg = msg;
        return this;
    }

    public Boolean getSuccess() {
        return success;
    }

    public String getMsg() {
        return msg;
    }

    public Object getData() {
        return data;
    }
}
